package abio.XasML.builder
{
	import flash.events.EventDispatcher;
	
	[Event(name="complete", type="flash.events.Event")]
	public class context extends EventDispatcher
	{
		private var parent:context=null;
		internal function get Parent():context{
			return this.parent;
		}		
		private var builder:Object=null;
		internal function get Builder():Object{
			return this.builder;
		}
		
		public function context(builder:Object, parent:context)
		{
			this.parent=parent;
			this.builder=objectBuilder.build(builder, this);
		}

		public function newInstance(type:Object):Object{
			return objectAssemble.newInstance(type, this);
		}
	}
}